﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.IO;

namespace WebClient {
    public partial class SendData : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e) {
            string id = Request.Params["id"];
            WebRequest request = WebRequest.Create("http://localhost:1445/NhaTroService.svc/NhaTro/Xoa/" + id);
            request.Method = "DELETE";
                        
            WebResponse respone = request.GetResponse();
            StreamReader reader = new StreamReader(respone.GetResponseStream());

            Response.Write(reader.ReadToEnd());
        }
    }
}